package com.boyunv.mediator.example01.example02;
/*
 *@description
 *
 *@author boyunv
 *@create 2023/9/10 10:13
 *@version 1.0
 */

public class Client {
    
    public static void main(String[] args) {
        //中介机构
        MediatorStructure mediator = new MediatorStructure();
        //房主
        HouseOwner yunbuV = new HouseOwner("yunbuV", mediator);
        
        //租房者
        Tenant aristo = new Tenant("aristo", mediator);
        //中介收集房主和租房者的信息
        mediator.setHouseOwner(yunbuV);
        mediator.setTenant(aristo);
        
        //租房人的需求
        aristo.contact("需要在复旦一个研究生宿舍,6000");
        
        //房主需求
        yunbuV.contact("拿出复旦录取通知书就行");
        
        
        
    }
}
